|
Author |
Thread Statistics | Show CCP posts - 2 post(s) |

Aio Kaze
Perkone Caldari State
1
|
Posted - 2016.02.15 03:09:10 -
[1] - Quote
I'm pretty new to the whole C# thing (Literally my first time outside of mucking around in Unity) so this might just be me being stupid but I'm having a problem with that new CREST version you released.
I have the following code with a TextBox in an otherwise empty Windows Form Project (pared down for testing this error):
using System; using System.Linq; using System.Windows.Forms; using System.IO; using eZet.EveLib.EveCrestModule;
namespace EveCrestTypesTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void textBox1_TextChanged(object sender, EventArgs e) {
}
private void Form1_Load(object sender, EventArgs e) { LoadTypes(); }
private void LoadTypes() { textBox1.Text += "Setting up.\r\n"; EveCrest crest = new EveCrest(); var root = crest.GetRoot(); textBox1.Text += "Testing types loading.\r\n"; var types = root.Query(r => r.MarketTypes); var list = types.Items.ToList(); while (types.Next != null) { try { types = types.Query(t => t.Next); list.AddRange(types.Items); textBox1.Text += list.Count + " types loaded.\r\n"; } catch(AggregateException e) { File.AppendAllText(Application.StartupPath + "\\logs\\log.txt", e.InnerException.ToString() + "\r\n\r\n"); MessageBox.Show("Wrote error to file."); System.Environment.Exit(e.InnerException.HResult); } } textBox1.Text += "Types loaded."; } } }
If I add the current NuGet version of EveLib (3.0.0, I don't see 3.2.0 over there) as a project reference, everything compiles fine and the program loads all of the types, with no exceptions. However, if I grab 3.2.0 from GitHub, compile it and use that as a reference, I get the following exception thrown:
eZet.EveLib.EveCrestModule.Exceptions.EveCrestException: The query parameter page were cast able to type integerType, error invalid literal for long() with base 10: '2?' ---> System.Net.WebException: The remote server returned an error: (415) Unsupported Media Type. |

Aio Kaze
Perkone Caldari State
1
|
Posted - 2016.02.15 17:49:49 -
[2] - Quote
Is there a specific function for getting CREST market history data without constructing URLS? The only function I've found is GetMarketHistory(int regionID, int typeID) and its Async version, both of which are marked as obsolete and tell me to navigate to an endpoint from the root, but I can't find one.
As a sidenote, individual Regions don't seem to contain their IDs, meaning I have to go back up to the RegionCollection and find it again from there. |

Aio Kaze
Perkone Caldari State
1
|
Posted - 2016.02.15 18:20:44 -
[3] - Quote
Icahmura Hasaki wrote:Aio Kaze wrote:Is there a specific function for getting CREST market history data without constructing URLS? The only function I've found is GetMarketHistory(int regionID, int typeID) and its Async version, both of which are marked as obsolete and tell me to navigate to an endpoint from the root, but I can't find one.
As a sidenote, individual Regions don't seem to contain their IDs, meaning I have to go back up to the RegionCollection and find it again from there. The "correct" way to currently is to construct urls and append them as explained 1 or 2 pages back, unfortunately. I'll be looking into that next, after this update. I'll have a look at region IDs, just fixed the issue you mentioned earlier about the new version :) edit: var BlackRise = crest.GetRoot().Query(a => a.Regions).Query(b=> b.Single(x => x.Name == "BlackRise")); BlackRise.MarketBuyOrders += "?type=https://public-crest.eveonline.com/types/2/"; var orders = BlackRise.Query(c=> c.MarketBuyOrders).AllItems(); So you get find the MarketOrders resource from the root, but you have to append the type parameter.
Ah, okay. I was confused because the GetMarketHistory() obsolete message was specifically telling me to look for something in the root and had wondered if something had changed in the couple months since that post.
Also, that was fast. :) |

Aio Kaze
Perkone Caldari State
1
|
Posted - 2016.02.15 18:32:38 -
[4] - Quote
I haven't come across any other errors so that should be everything I noticed fixed. :) |

Aio Kaze
Black Shell Industries
1
|
Posted - 2016.02.17 20:53:16 -
[5] - Quote
https://forums.eveonline.com/default.aspx?g=posts&t=403600
Not yet, but it's on their (very long) list of things to fix. |

Aio Kaze
Black Shell Industries
1
|
Posted - 2016.03.13 16:07:20 -
[6] - Quote
Any time I notice it's down I tweet to @EVE_Status. |

Aio Kaze
Black Shell Industries
2
|
Posted - 2016.05.05 13:07:36 -
[7] - Quote
The LP store endpoint would be very useful as I've been wanting to put together an LP profit calculator and don't fancy entering thousands of LP/ISK/item requirements by hand. |
|
|
|